package com.honeycomb.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 结果传输对象
 * 
 * @author Wangyu
 */
public class ResultDto<T extends BaseVO> implements Serializable {

	private boolean success;
	private String errorMSG;
	private List<T> voList = new ArrayList<T>();
	private T firstResult;

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getErrorMSG() {
		return errorMSG;
	}

	public void setErrorMSG(String errorMSG) {
		this.errorMSG = errorMSG;
	}

	public List<T> getResultList() {
		return this.voList;
	}

	public void addToResultList(T vo) {
		this.voList.add(vo);
		if (this.firstResult == null) {
			this.firstResult = vo;
		}
	}

	public T getFirstResult() {
		return firstResult;
	}
}
